package com.bwie.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author: 鑫仔
 * @Date:  2025/7/21 14:20
 * @Description: 
 **/

/**
 * 商品分类表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_type")
public class Type implements Serializable {
    /**
     * ID
     */
    @TableId(value = "type_id", type = IdType.AUTO)
    private Integer typeId;

    /**
     * 分类名称
     */
    @TableField(value = "type_name")
    @NotBlank(message = "名称不可为空")
    private String typeName;

    /**
     * 分类图片
     */
    @TableField(value = "type_image")
    @NotBlank(message = "分类图片不可为空")
    private String typeImage;

    /**
     * 排序
     */
    @TableField(value = "type_top")
    @NotNull(message = "排序不可为空")
    private Integer typeTop;

    /**
     * 状态;状态：0显示1隐藏
     */
    @TableField(value = "type_status")
    @NotNull(message = "状态不可为空")
    private String typeStatus;

    /**
     * 父级ID
     */
    @TableField(value = "type_pid")
    private Integer typePid;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "update_by")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    private static final long serialVersionUID = 1L;
}